package innerclass.demo;

/**
 * @author: knowno
 * @create: 2024-09-10 09:15
 * @Version 1.0
 * 4.匿名内部类
 **/
public class OuterClass4 {

    public static void main(String[] args) {

        IA ia = new IA() {
            @Override
            public void t1() {
                System.out.println("t1");
            }
        };

        ia.t1();

        //我们以前一定用过
        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                System.out.println("run...");
            }
        };
    }


}


interface IA {
    public void t1();
}
